<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

	<link href="<c:url value="/css/addUser.css" />" rel="stylesheet">
	<script type="text/javascript" src="<c:url value="/js/user.js" />"></script>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
	<title>AddUser</title>
	
</head>

<body>

	${statusMessage}
	<form:form name="form" action="addUser" method="POST" class="smart-green" onsubmit="return validateForm()">
		<h1>
			Add User <span>Please fill all the texts in the fields.</span>
		</h1>
		<div id="errorMsg"></div>
		<table>
			<tr>
				<td>User Name<span style="color: red">* </span>:</td>
				<td><form:input path="username" id="username" /></td>
			</tr>
			<tr>
				<td>Password <span style="color: red">* </span>:</td>
				<td><form:password path="password" /></td>
			</tr>
			<tr>
				<td>First Name <span style="color: red">* </span>:</td>
				<td><form:input path="firstName" /></td>
			</tr>
			<tr>
				<td>Last Name <span style="color: red">* </span>:</td>
				<td><form:input path="lastName" /></td>
			</tr>
			<tr>
				<td>Email <span style="color: red">* </span>:</td>
				<td><form:input path="email" /></td>
			</tr>
			<tr>
				<td>Role <span style="color: red">* </span>:</td>
				<td><form:select path="role">
						<form:option value="--select--"/>
						<form:option value="manager" />
						<form:option value="developer" />
						<form:option value="tester" />
					</form:select>
				</td>
			</tr>
			<tr>
				<td><input type="submit" value="Save" class="button"/></td>
				<td><input type="reset" value="Refresh" class="button"/></td>
				<td><a href="back"><img src="<c:url value="/images/backbutton.jpg" />" alt="Back" height="50" width="50" title="Back"></a></td>
			</tr>
		</table>
	</form:form>
	
</body>
</html>